Readme 

This is the replication package for "Family Support During Hard Times: Dynamics of Intergenerational Exchange after Adverse Events" by Jessamyn Schaller and Chase S. Eck

This paper uses data from the Health and Retirement Survey (HRS). The HRS conditions of use prevent us from posting the data files used in this paper to this replication package. However, all necessary data are publicly available at https://hrsdata.isr.umich.edu/data-products/rand. If new versions of the files have been released, the ones used for this study can be found in the RAND HRS archived data products page: https://hrsdata.isr.umich.edu/data-products/rand-hrs-archived-data-products. Data dictionaries can be found on the HRS's data download site as well. 

To run the replication you will need to 
 0) Create the folders replication_package_schaller_eck_2023/data/raw_data and replication_package_schaller_eck_2023/data/constructed_data
 1) Register/login to the HRS data download site (https://hrsdata.isr.umich.edu/data-products/rand)
 2) Download the following files, and put them in the raw_data folder. All files should be in Stata format (.dta) and may need to renamed.

- Rand HRS Fat Files from 1992 to 2014 (each wave is a separate file); file name structure should be randfatdfyy.dta (yy is the last 2 digits of the year)
- Rand HRS Family Data 2014 (release date: May 2018, v1); file name should be randhrsfamk1992_2014v1.dta
- Rand HRS Longitudinal File version P; file name should be randhrs_p.dta

To generate the results in the paper first execute run_replication.do in STATA. Then, generate the coefficient plots by executing code/coefplot_draw.R in R. Finally, construct the final tables and figures using Latex in paper/main_results.tex and paper/appendix_results.tex. See the comments in run_replication.do for more information on each code file and its outputs. Additional information can also be found in the comments of each code file as well. NOTE: the programs read/write results using folders in the output directory. The code will not work if any of the default folders are missing or renamed. 

All analyses were run using R version 3.6.2 and Stata SE 15. 

Note: if running on a non-windows computer, then it may be necessary to change the `\` to a `/` in each of the file paths. 

If you have any questions please reach out to Chase Eck (chase.eck@bcm.edu) and Jessamyn Schaller (jessamyn.schaller@claremontmckenna.edu).




